<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

    <head>
        <meta charset="utf-8" />
        <title>添加司机</title>
        <link rel="stylesheet" href="/Public/Leader/css/bootstrap.css">
        <link rel="stylesheet" type="text/css" href="/Public/Leader/css/index.css" />
        <style>
            .nav-container .item{
                display:none;
            }
            .nav-container .item.active,
            .nav-tabs .item.active{
                display:block;
            }
            .myprovince{
                height:30px;
                line-height:30px;
                border-radius:5px;
            }
        </style>
    </head>
    <body>
            <ul class="nav nav-tabs">
                <li role="presentation" class="item active"><a href="#">基本信息</a></li>
                <li role="presentation" class="item"><a href="#">驾驶员信息</a></li>
                <li role="presentation" class="item"><a href="#">车辆信息</a></li>

            </ul>


            <div class="nav-container">
                <div class="item active">
                    <div class="panel panel-default" style="margin-top: 20px;">
                        <div class="panel-body">
                            <div id="myTabContent" class="tab-content">
                                <form role="form" id="savesiji">
                                    <div class="tab-pane active in" id="home">
                                        <div class="form-group">
                                            <label for="name">openid：</label>
                                            <input type="text" class="form-control" value="<?php echo ($us['openid']); ?>" readonly="readonly" name="openid" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">姓名：</label>
                                            <input type="hidden" value="<?php echo ($us["id"]); ?>" name="id" class="input-xlarge">
                                            <input type="text" class="form-control" value="<?php echo ($us['xingming']); ?>" name="xingming" style="width:40%;">
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label for="name">城市：</label>-->
                                            <!--<input type="text" class="form-control" value="<?php echo ($us['city']); ?>" name="city" style="width:40%;">-->
                                        <!--</div>-->

                                        <div class="form-group">
                                            <label for="name">城市：</label>
                                            <div data-toggle="distpicker">
                                                <select class="myprovince" name="chengshi" id="chengshi" data-province="<?php echo ($us['chengshi']); ?>"></select>
                                                <select class="myprovince" name="city" id="city" data-city="<?php echo ($us['city']); ?>"></select>
                                                <!--<select class="myprovince" ></select>-->
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label for="name">身份证号：</label>
                                            <input type="text" class="form-control" value="<?php echo ($us['card_sf']); ?>" name="card_sf" style="width:40%;">
                                        </div>
                                        <!-- <div class="form-group">
                                            <label for="name">初次领取驾照时间：</label>
                                            <input type="date" class="form-control" name="create_jztime" value="<?php echo (date('Y-m-d',$us['create_jztime'])); ?>" style="width:40%;">
                                        </div> -->
                                        <div class="form-group">
                                            <label for="name">身份证正面：</label>
                                            <input type="file" class="form-control" name="card_img1" onchange="uploadsrc('card_img1','card_img2','card_img')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["card_img"]); ?>" id="card_img2" width="100px" height="50px"/>
                                            <input type="hidden" name="card_img" value="<?php echo ($hosts); echo ($us["card_img"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">身份证反面：</label>
                                            <input type="file" class="form-control" name="card_gh1" onchange="uploadsrc('card_gh1','card_gh2','card_gh')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["card_gh"]); ?>" id="card_gh2" width="100px" height="50px"/>
                                            <input type="hidden" name="card_gh" value="<?php echo ($hosts); echo ($us["card_gh"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶证正面：</label>
                                            <input type="file" class="form-control" name="jiashi_img1" onchange="uploadsrc('jiashi_img1','jiashi_img2','jiashi_img')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["jiashi_img"]); ?>" id="jiashi_img2" width="100px" height="50px"/>
                                            <input type="hidden" name="jiashi_img" value="<?php echo ($hosts); echo ($us["jiashi_img"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶证反面：</label>
                                            <input type="file" class="form-control" name="jiashi_fm1" onchange="uploadsrc('jiashi_fm1','jiashi_fm2','jiashi_fm')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["jiashi_fm"]); ?>" id="jiashi_fm2" width="100px" height="50px"/>
                                            <input type="hidden" name="jiashi_fm" value="<?php echo ($hosts); echo ($us["jiashi_fm"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">行驶证正面：</label>
                                            <input type="file" class="form-control" name="xingshi_zm1" onchange="uploadsrc('xingshi_zm1','xingshi_zm2','xingshi_zm')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["xingshi_zm"]); ?>" id="xingshi_zm2" width="100px" height="50px"/>
                                            <input type="hidden" name="xingshi_zm" value="<?php echo ($hosts); echo ($us["xingshi_zm"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">行驶证反面：</label>
                                            <input type="file" class="form-control" name="xingshi_fm1" onchange="uploadsrc('xingshi_fm1','xingshi_fm2','xingshi_fm')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["xingshi_fm"]); ?>" id="xingshi_fm2" width="100px" height="50px"/>
                                            <input type="hidden" name="xingshi_fm" value="<?php echo ($hosts); echo ($us["xingshi_fm"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">行驶证副本：</label>
                                            <input type="file" class="form-control" name="xingshi_fb1" onchange="uploadsrc('xingshi_fb1','xingshi_fb2','xingshi_fb')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["xingshi_fb"]); ?>" id="xingshi_fb2" width="100px" height="50px"/>
                                            <input type="hidden" name="xingshi_fb" value="<?php echo ($hosts); echo ($us["xingshi_fb"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">人车合影：</label>
                                            <input type="file" class="form-control" name="mancar_img1" onchange="uploadsrc('mancar_img1','mancar_img2','mancar_img')" style="width:40%;">
                                            <img src="<?php echo ($hosts); echo ($us["mancar_img"]); ?>" id="mancar_img2" width="100px" height="50px"/>
                                            <input type="hidden" name="mancar_img" value="<?php echo ($hosts); echo ($us["mancar_img"]); ?>"/>
                                        </div>
                                        <div class="form-group">
                                            <button  type="button" class="btn btn-primary" onclick="tj()">修改</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="item">
                    <div class="panel panel-default" style="margin-top: 20px;">
                        <div class="panel-body">
                            <div class="tab-content">
                                <div class="tab-pane active in">
                                    <form role="form" id="driverform">
                                        <input type="hidden" value="<?php echo ($us['openid']); ?>" name="openid"/>
                                        <div class="form-group">
                                            <label for="name">机动车驾驶证号：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['licenseld']); ?>" name="Licenseld" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员性别：<span style="color:#FF0000;">*</span></label>
                                            <input type="radio" name="DriverGender" value="男"  <?php if($basicdriver["drivergender"] == 男): ?>checked<?php endif; ?> >男
                                            <input type="radio" name="DriverGender" value="女"  <?php if($basicdriver["drivergender"] == 女): ?>checked<?php endif; ?>>女
                                        </div>
                                        <div class="form-group">
                                            <label for="name">国籍：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['drivernationality']); ?>" name="DriverNationality" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">户籍：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['censusregister']); ?>" name="censusregister" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">户口住址或长期住址：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['driveraddress']); ?>" name="DriverAddress" style="width:40%;">
                                        </div>


                                        <div class="form-group">
                                            <label for="name">驾驶员通信地址：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['drivercontactaddress']); ?>" name="DriverContactAddress" style="width:40%;">
                                        </div>

                                        <div class="form-group">
                                            <label for="name">出生日期：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['driverbirthday'])); ?>" name="DriverBirthday" style="width:40%;">
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label for="name">驾驶证扫描件：</label>-->
                                            <!--<input type="text" class="form-control" value="<?php echo ($basicdriver['licensephotoid']); ?>" name="LicensePhotoId" style="width:40%;">-->
                                        <!--</div>-->

                                        <div class="form-group">
                                            <label for="name">准驾车型：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['drivertype']); ?>" name="DriverType" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶证有效期限起：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['driverlicenseon'])); ?>" name="DriverLicenseOn" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶证有效期限止：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['driverlicenseoff'])); ?>" name="DriverLicenseOff" style="width:40%;">
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label for="name">驾驶员照片：</label>-->
                                            <!--<input type="text" class="form-control" value="<?php echo ($basicdriver['photold']); ?>" name="Photold" style="width:40%;">-->
                                        <!--</div>-->
                                        <div class="form-group">
                                            <label for="name">驾驶员民族：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['drivernation']); ?>" name="DriverNation" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员婚姻状况：</label>
                                            <input type="radio" value="未婚" name="DriverMaritalStatus" <?php if($basicdriver["drivermaritalstatus"] == 未婚): ?>checked<?php endif; ?>>未婚
                                            <input type="radio" value="已婚" name="DriverMaritalStatus" <?php if($basicdriver["drivermaritalstatus"] == 已婚): ?>checked<?php endif; ?>>已婚
                                            <input type="radio" value="离异" name="DriverMaritalStatus" <?php if($basicdriver["drivermaritalstatus"] == 离异): ?>checked<?php endif; ?>>离异
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员外语能力：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['driverlanguagelevel']); ?>" name="DriverLanguageLevel" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员联系电话：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['responsiblephone']); ?>" name="ResponsiblePhone" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">服务类型：<span style="color:#FF0000;">*</span></label>
                                            <input type="radio" value="1" name="CommercaialType" <?php if($basicdriver["commercaialtype"] == 1): ?>checked<?php endif; ?>>网络预约出租车
                                            <input type="radio" value="2" name="CommercaialType" <?php if($basicdriver["commercaialtype"] == 2): ?>checked<?php endif; ?>>巡游出租汽车
                                            <input type="radio" value="3" name="CommercaialType" <?php if($basicdriver["commercaialtype"] == 3): ?>checked<?php endif; ?>>私人小客车合乘
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员学历：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['drivereducation']); ?>" name="DriverEducation" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">初次领取驾驶证日期：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['getdriverlicensedatew'])); ?>" name="GetDriverLicenseDatew" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员证发证日期：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['networkcarlssuedate'])); ?>" name="NetworkCarlssueDate" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶证有效期限止：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['driverlicenseoffw'])); ?>" name="DriverLicenseOffw" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员证发证机构：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['networkcarlssueorganization']); ?>" name="NetworkCarlssueOrganization" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">驾驶员培训课程名称：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['coursename']); ?>" name="CourseName" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">培训课程日期：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['coursedate'])); ?>" name="CourseDate" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">培训开始时间：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['starttime'])); ?>" name="StartTime" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">培训结朿时间：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['stoptime'])); ?>" name="StopTime" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">培训时长（天）：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['uration']); ?>" name="uration" style="width:40%;">
                                        </div>
                                        <!--<div class="form-group">-->
                                            <!--<label for="name">完成订单次数：</label>-->
                                            <!--<input type="text" class="form-control" value="<?php echo ($basicdriver['ordercount']); ?>" name="OrderCount" style="width:40%;">-->
                                        <!--</div>-->
                                        <div class="form-group">
                                            <label for="name">交通违章次数：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['trafficviolationcount']); ?>" name="TrafficViolationCount" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">合同（或协议）有效期起：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['startdate'])); ?>" name="StartDate" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">合同（或协议）有效期止：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$basicdriver['stopdate'])); ?>" name="StopDate" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">是否巡游出租汽车驾驶员：<span style="color:#FF0000;">*</span></label>
                                            <input type="radio" name="TaxiDriver" value="0" <?php if($basicdriver["taxidriver"] == 0): ?>checked<?php endif; ?>/>否
                                            <input type="radio" name="TaxiDriver" value="1" <?php if($basicdriver["taxidriver"] == 1): ?>checked<?php endif; ?>/>是
                                        </div>
                                        <div class="form-group">
                                            <label for="name">是否专职驾驶员：</label>
                                            <input type="radio" name="FullTimeDriver" value="0" <?php if($basicdriver["fulltimedriver"] == 0): ?>checked<?php endif; ?>/>否
                                            <input type="radio" name="FullTimeDriver" value="1" <?php if($basicdriver["fulltimedriver"] == 1): ?>checked<?php endif; ?>/>是
                                        </div>
                                        <div class="form-group">
                                            <label for="name">是否在驾驶员黑名单：</label>
                                            <input type="radio" name="InDriverBlacklist" value="0" <?php if($basicdriver["indriverblacklist"] == 0): ?>checked<?php endif; ?>/>否
                                            <input type="radio" name="InDriverBlacklist" value="1" <?php if($basicdriver["indriverblacklist"] == 1): ?>checked<?php endif; ?>/>是
                                        </div>
                                        <div class="form-group">
                                            <label for="name">手机运营商：<span style="color:#FF0000;">*</span></label>
                                            <input type="radio" name="NetType" value="1" <?php if($basicdriver["nettype"] == 1): ?>checked<?php endif; ?>/>中国移动
                                            <input type="radio" name="NetType" value="2" <?php if($basicdriver["nettype"] == 2): ?>checked<?php endif; ?>/>中国联通
                                            <input type="radio" name="NetType" value="3" <?php if($basicdriver["nettype"] == 3): ?>checked<?php endif; ?>/>中国电信
                                            <input type="radio" name="NetType" value="4" <?php if($basicdriver["nettype"] == 4): ?>checked<?php endif; ?>/>其他
                                        </div>
                                        <div class="form-group">
                                            <label for="name">使用APP版本号：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['appversion']); ?>" name="AppVersion" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">使用地图类型：<span style="color:#FF0000;">*</span></label>
                                            <input type="radio" name="MapType" value="1" <?php if($basicdriver["maptype"] == 1): ?>checked<?php endif; ?>/>百度地图
                                            <input type="radio" name="MapType" value="2" <?php if($basicdriver["maptype"] == 2): ?>checked<?php endif; ?>/>髙德地图
                                            <input type="radio" name="MapType" value="3" <?php if($basicdriver["maptype"] == 3): ?>checked<?php endif; ?>/>其他
                                        </div>

                                        <div class="form-group">
                                            <label for="name">紧急情况联系人：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['emergencycontact']); ?>" name="EmergencyContact" style="width:40%;">
                                        </div>

                                        <div class="form-group">
                                            <label for="name">紧急情况联系人电话：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['emergencycontactphone']); ?>" name="EmergencyContactPhone" style="width:40%;">
                                        </div>

                                        <div class="form-group">
                                            <label for="name">紧急情况联系人通信地址：</label>
                                            <input type="text" class="form-control" value="<?php echo ($basicdriver['emergencycontactaddress']); ?>" name="EmergencyContactAddress" style="width:40%;">
                                        </div>

                                        <div class="form-group">
                                            <label for="name">服务质量信誉等级：</label>
                                            <input type="radio" name="Level" value="1" <?php if($basicdriver["level"] == 1): ?>checked<?php endif; ?>/>1星
                                            <input type="radio" name="Level" value="2" <?php if($basicdriver["level"] == 2): ?>checked<?php endif; ?>/>2星
                                            <input type="radio" name="Level" value="3" <?php if($basicdriver["level"] == 3): ?>checked<?php endif; ?>/>3星
                                            <input type="radio" name="Level" value="4" <?php if($basicdriver["level"] == 4): ?>checked<?php endif; ?>/>4星
                                            <input type="radio" name="Level" value="5" <?php if($basicdriver["level"] == 5): ?>checked<?php endif; ?>/>5星
                                        </div>
                                        <input type="hidden" name="oper" value="driver"/>
                                        <div class="form-group">
                                            <button  type="button" class="btn btn-primary" onclick="savedriver()">修改</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="item">
                    <div class="panel panel-default" style="margin-top: 20px;">
                        <div class="panel-body">
                            <div class="tab-content">
                                <div class="tab-pane active in" >
                                    <form role="form" id="savecar">
                                        <input type="hidden" value="<?php echo ($us['openid']); ?>" name="openid"/>
                                        <div class="form-group">
                                            <label for="name">车辆所在城市：<span style="color:#FF0000;">*</span></label>
                                            <!--<input type="text" class="form-control" value="<?php echo ($car['address']); ?>" name="address" style="width:40%;">-->
                                            <div data-toggle="distpicker">
                                                <select class="myprovince"  name="province" data-province="<?php echo ($car['province']); ?>"></select>
                                                <select class="myprovince" name="city" data-city="<?php echo ($car['city']); ?>"></select>
                                                <input type="hidden" name="address" value=""/>


                                                <!--<select class="myprovince" ></select>-->
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车牌号码：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['vehicleno']); ?>" name="vehicleno" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆厂牌：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['brand']); ?>" name="brand" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆类型：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['vehicletype']); ?>" name="vehicletype" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆型号：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['model']); ?>" name="model" style="width:40%;">
                                        </div>

                                        <!--<div class="form-group">-->
                                            <!--<label for="name">所属车主：</label>-->
                                            <!--<input type="text" class="form-control" value="<?php echo ($car['ownername']); ?>" name="ownername" style="width:40%;">-->
                                        <!--</div>-->

                                        <div class="form-group">
                                            <label for="name">车身颜色：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['vehiclecolor']); ?>" name="vehiclecolor" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">发动机号：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['engineld']); ?>" name="engineld" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆VIN码：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['vin']); ?>" name="vin" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆燃料类型：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['fueltype']); ?>" name="fueltype" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">核定载客位：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['seats']); ?>" name="seats" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆注册日期：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$car['certifydatea'])); ?>" name="certifydatea" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆年度审验状态：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['checkstate']); ?>" name="checkstate" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">保险公司名称：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['insurcom']); ?>" name="insurcom" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">保险号：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['insurnum']); ?>" name="insurnum" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">保险类型：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['insurtype']); ?>" name="insurtype" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">保险金额：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['insurcount']); ?>" name="insurcount" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">保险生效时间：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$car['insureff'])); ?>" name="insureff" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">保险到期时间：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$car['insurexp'])); ?>" name="insurexp" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">运价类型：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['faretype']); ?>" name="faretype" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">发动机排量：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['enginedisplace']); ?>" name="enginedisplace" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">行驶总里程：<span style="color:#FF0000;">*</span></label>
                                            <input type="text" class="form-control" value="<?php echo ($car['totalmile']); ?>" name="totalmile" style="width:40%;">
                                        </div>
                                        <div class="form-group">
                                            <label for="name">车辆检修类型：<span style="color:#FF0000;">*</span></label>
                                            <input type="radio" name="fixstate" value="0" <?php if($car["fixstate"] == 0): ?>checked<?php endif; ?>/>未检修
                                            <input type="radio" name="fixstate" value="1" <?php if($car["fixstate"] == 1): ?>checked<?php endif; ?>/>已检修
                                            <input type="radio" name="fixstate" value="2" <?php if($car["fixstate"] == 2): ?>checked<?php endif; ?>/>未知
                                        </div>
                                        <div class="form-group">
                                            <label for="name">下次年检时间：<span style="color:#FF0000;">*</span></label>
                                            <input type="date" class="form-control" value="<?php echo (date('Y-m-d',$car['nextfixdate'])); ?>" name="nextFixdate" style="width:40%;">
                                        </div>
                                            <input type="hidden" name="oper" value="car"/>
                                        <div class="form-group">
                                            <button  type="button" class="btn btn-primary" onclick="savecar()">修改</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>


            </div>
    </body>



    <script src="/Public/Leader/js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Public/Leader/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/Public/provinceCity/js/distpicker.data.js"></script>
    <script src="/Public/provinceCity/js/distpicker.js"></script>
    <script src="/Public/provinceCity/js/main.js"></script>
    <script src="/Public/layer/layer.js" type="text/javascript" charset="utf-8"></script>

    <script type="text/javascript">
        $('.nav-tabs').on('click','.item',function(){
            var $this = $(this);
            var i = $this.index();
            if(!$this.hasClass('active')){
                $this.addClass('active').siblings().removeClass('active');
                $('.nav-container').children().eq(i).addClass('active').siblings().removeClass('active');
            }
        });

        $("select[name='city']").on("change",function(){
            var data_code = $("#address").find('option:selected').attr('data-code');
            $("input[name='address']").val(data_code);
        });


        function tj() {
            $.ajax({
                type: "POST",
                url: "<?php echo U('savesiji');?>",
                cache: false,
                data: $('#savesiji').serialize(),
                success: function (data) {
                    var result = JSON.parse(data);
                    console.log(result);
                    if(result.code == 1){
                        layer.msg(result.msg);
                        setInterval(function(){
                            location.reload();
                        },2000)
                    }else{
                        layer.msg(result.msg);
                    }
                }
            })
        }

        //图片上传
        /**
         * @param picname1  file文件的名字
         * @param picname2  img class的名字
         * @param picname   input hidden name的名字
         */

        function uploadsrc(picname1,picname2,picname) {
            var form = new FormData();
            var mypicname = "input[name="+picname1+"]";
            console.log(mypicname);
            form.append("file", $(mypicname)[0].files[0]);
            $.ajax({
                type: "POST",
                url: "<?php echo U('User/uploadpic');?>",
                data: form,
                dataType: "json",
                processData: false,
                contentType: false,
                success: function (msg) {
                    if (msg.code) {
                        $("#"+picname2).attr('src',msg.result[0]);
                        var name = "input[ name='"+picname+"' ]";
                        $(name).val(msg.result[0]);
                    } else {
                        layer.msg(msg.msg);
                    }
                }
            });
        }


        //保存司机车的基本信息
        function savecar() {
            var formdata = $("#savecar").serialize();
            var result
            $.ajax({
                type: "POST",
                url: "<?php echo U();?>",
                data: formdata,
                success: function(msg){
                    result = JSON.parse(msg);
                    if(result.code == 1){
                        location.reload();
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        }

        //保存驾驶员的基本信息
        function savedriver() {
            var formdata = $("#driverform").serialize();
            var result
            $.ajax({
                type: "POST",
                url: "<?php echo U();?>",
                data: formdata,
                success: function(msg){
                    result = JSON.parse(msg);
                    if(result.code == 1){
                        location.reload();
                    }else{
                        layer.msg(result.msg);
                    }
                }
            });
        }
    </script>


</html>